#ifndef CLOGSYSTEM


typedef enum
{
	CONSOLE,
	LOGFILE
}OUTPUTMODE;

typedef enum
{
	FATAL_LEVEL,
	ERROR_LEVEL,
	WARNING_LEVEL,
	DEBUG_LEVEL,
	INFO_LEVEL
}OUTPUTLEVEL;


class CLogSystem
{
public:
	CLogSystem();
	~CLogSystem();
	static CLogSystem* GetInstance() 
	{
        static CLogSystem* mInstance = new CLogSystem();
        return mInstance;
    }

	void INFO(char* content);
	void DEBUG(char* content);
	void WARNING(char* content);
	void ERROR(char* content);
	void FATAL(char* content);

	int SetOutputMode(OUTPUTMODE mode);
	int SetOutputLevel(OUTPUTLEVEL level);

private:
	char* GetDateString(void);
	int Record2File(const char* path, char* content);

	OUTPUTMODE mOutputMode;
	OUTPUTLEVEL mOutputLevel;
};

#endif

